
#include "SList.h"

void TestSList() {
	SLTNode* plist = NULL;
	for (int j = 0; j < 4; ++j)
		SListPushFront(&plist, j);
	for (int i = 0; i < 4; ++i)
		SListPushBack(&plist, i);
	SListPrint(plist);

	//printf("\n");
	//
	//for (int m = 0; m < 2; ++m)
	//	SListPopFront(&plist);
	//SListPrint(plist);

	//printf("\n");

	//for (int m = 0; m < 2; ++m)
	//	SListPopBack(&plist);
	//SListPrint(plist);

	printf("\n");

	SLTNode* pos = SListFind(plist, 3);
	if (pos)
		SListInsert(&plist, pos, 30);
	SListPrint(plist);

	printf("\n");

	pos = SListFind(plist, 30);
	if (pos)
		SListErase(&plist, pos);
	SListPrint(plist);
}

int main() {
	TestSList();

	return 0;
}
